home *** CD-ROM | disk | FTP | other *** search
- /* $VER: PGPViewPubKeys.thor 3.4 (15.05.95)
- *
- * An ARexx script that will view the contents of your public
- * PGP keyring.
- *
- * Based on ViewPGPpubkeys.thor v0.9ß (01.06.94) © Christian Sandberg
- * Additions by: Eivind Nordseth, Ultima Thule Software.
- */
-
- options results
- options failat 99
-
- if ~show('p', 'BBSREAD') then
- do
- address command
- "run >nil: `GetEnv THOR/THORPath`bin/LoadBBSRead"
- "WaitForPort BBSREAD"
- end
-
- REQUESTNOTIFY TEXT '"Do you want limited or full verbose?"' BT '"_Limited|_Full"'
- if RC > 0 then do
- say 'This script is not running on the THOR ARexx port!'
- exit
- end
-
- if result = 1 then verbose = 'v'
- else verbose = 'vv'
-
- GETGLOBALCONFIG CFG
- if(rc ~= 0) then exit
-
- address BBSREAD GETGLOBALDATA stem GLOBALDATA
- if(rc ~= 0) then exit
-
- Call Close 'STDOUT'
- Call Close 'STDIN'
- Call Open 'STDOUT','CON:0/14//400/PGPAmiga/CLOSE/AUTO/WAIT/SCREEN' || CFG.PUBSCREENNAME
- Call Pragma '*','STDOUT'
- Call Open 'STDIN','*'
-
- if GLOBALDATA.PGPCommand = '' then
- do
- call getpath
- pgpcommand = result
- end
- else pgpcommand = GLOBALDATA.PGPCOMMAND
-
- address command pgpcommand ' -k' || verbose
- if(rc ~= 0) then
- do
- REQUESTNOTIFY TEXT '"PGP failed. Check path or PGPPATH envirorment variable."' BT '"_Ok"'
- exit
- end
-
- exit
-
- getpath: procedure
- address command 'GetEnv >PIPE:PGPPATH PGPPATH'
- If rc = 0 Then
- Do
- If Open('ppath','PIPE:PGPPATH','R') Then
- Do
- path = ReadLN('ppath')
- If ~Close('ppath') Then Nop
- path = path||'/PGP'
- Return path
- End
- Else Return ""
- End
-